{template 'header', $module}
<div class="main-block bd-gray">
	<div class="hd fn-clear">
		<h2 class="fn-left">金卡专户</h2>
	</div>
    <div class="main-nav fn-clear">
	<ul id="data-nav" class="fn-left fn-clear">
		<li id="status_"><a href="insurance.php">金卡专户资金记录</a></li>
	</ul>
    <span class="overage">当前余额：<em class="cred">{$_cardmoney}</em>元</span>
    </div>

	<form action="?">
		<input type="hidden" name="action" value="{$action}"/>
		<div class="filter con fn-clear">
			<p class="fn-left mr10">{Post::calender('fromtime', $fromtime, 'width:100')}</p>
			<span class="fn-left mr10">至 </span>
			<p class="fn-left mr10">{Post::calender('totime', $totime, 'width:100')}</p>
			<button class="btn fn-left mr10" type="submit">搜索</button>
			<button class="btn fn-left" type="reset" onclick="window.location='?action={$action}';">重置</button>
		</div>
	</form>
	<table class="pay-log-tb mt10 c000 con">
		<thead>
		<tr>
			<th width="80">流水号</th>
			<th width="80">收入</th>
			<th width="80">支出</th>
			<th width="100">余额</th>
			<th width="150">发生时间</th>
			<th width="150">事由</th>
			<th width="150">备注</th>
		</tr>
		</thead>
		<tbody>
		{if $records}
		{loop $records $k $v}
		<tr>
			<td >{$v[itemid]}</td>
			<td >{if $v[amount] > 0}{$v[amount]}{else}&nbsp;{/if}</td>
			<td >{if $v[amount] < 0}{$v[amount]}{else}&nbsp;{/if}</td>
			<td >{if $v[balance]}{$v[balance]}{else}&nbsp;{/if}</td>
			<td >{$v[addtime]}</td>
			<td >{$v[reason]}</td>
			<td >{$v[note]}</td>
		</tr>
		{/loop}
		<tr align="center">
			<td ><strong>小计</strong></td>
			<td >{$income}</td>
			<td >{$expense}</td>
			<td colspan="4">&nbsp;</td>
		</tr>
		{else}
		<tr>
			<td colspan="7">暂无记录</td>
		</tr>
		{/if}
		</tbody>
	</table>
	<div class="pages">{$pages}</div>
</div>
<script type="text/javascript">
	seajs.use(['$','member'], function($,member){
		member.active('menu_money', 'insurance', 'status_{$status}');
        $(".pay-log-tb").find("tr:not(:last)").hover(function(){
            $(this).addClass("over");
        },function(){
            $(this).removeClass("over");
        });
	});
</script>
{template 'footer', $module}